package com.yuw.hw20190410.test04;

public class ColaEmployeeManager {

	// 属性
	private ColaEmployee[] emps;

	public ColaEmployeeManager() {
		// 调用初始化员工的信息方法
		init();
	}

	// 行为
	public void printEmployeeSalaryByMonth(int month) {
		if (emps != null) {
			System.out.println("Cola公司" + month + "月份的工资名单：");
			for (ColaEmployee colaEmployee : emps) {
				colaEmployee.printSalay(month);
			}
		}
	}

	private void init() {
		// TODO 控制台输入完成数组的初始化操作
		emps = new ColaEmployee[3];
		emps[0] = new SalaryColaEmployee("张三", 4, 8000);
		emps[1] = new HourlyColaEmployee("李四", 3, 220, 80);
		emps[2] = new SalesColaEmployee("王五", 2, 150000, 0.1);

	}
}
